const SkeletonLoaderStore = {
  namespaced: true,
  state: {
    skeletonStatus: true,
  },
  mutations: {
    awakeStatus(state: { skeletonStatus: boolean }) {
      state.skeletonStatus = true;
    },
    sleepStatus(state: { skeletonStatus: boolean }) {
      state.skeletonStatus = false;
    },
  },
  actions: {
    changeSkeletonLoaderStatusSync({ commit }: any, payload: any) {
      commit("awakeStatus");
      setTimeout(() => {
        commit("sleepStatus");
      }, payload.parameter.timeLength);
    },
  },
};

export { SkeletonLoaderStore };
